<template>
    <div @click="changeNum">
        我是组件b
        <div>我是b组件拿到的数据{{ names }}</div>
        <div @click="changeAge">
            {{ nameObj.age }}
        </div>
    </div>
</template>

<script>
export default {
    methods: {
        changeNum() {},
        changeAge() {
            console.log(this.nameObj.age);
            this.nameObj.age = 999;
        }
    }
};
</script>

<style></style>
